package com.podcstr.entity;

import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

/**
 * @author azim
 * @since 5/12/13 
 */

@Entity
@Table(name = "tb_comments")
public class Comment extends PersistanceObject {

    @NotNull
    private String comment;

    @NotNull
    @Max(value = 5)
    private int rating;

    @OneToOne
    private User user;

    @NotNull
    @OneToOne
    private Podcast podcast;

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getRating() {
        return rating;
    }

    public void setRating(int rating) {
        this.rating = rating;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Podcast getPodcast() {
        return podcast;
    }

    public void setPodcast(Podcast podcast) {
        this.podcast = podcast;
    }
}
